package com.easylinkin.linkappapi.machinery.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easylinkin.linkappapi.machinery.dto.MachineryIotDeviceDto;
import com.easylinkin.linkappapi.machinery.entity.MachineryRecord;
import com.easylinkin.linkappapi.machinery.vo.MachineryDeviceVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 设备电子档案 Mapper 接口
 * </p>
 *
 * @author kanyuanfeng
 * @since 2022-08-03
 */
public interface MachineryRecordMapper extends BaseMapper<MachineryRecord> {

    /**
     * 跟条件查询机械设备冗余查询iot设备信息
     *
     * @param machineryDeviceVo 机械设备条件vo
     * @return 机械设备dto信息list
     */
    List<MachineryIotDeviceDto> queryMachineryAndDeviceList(MachineryDeviceVo machineryDeviceVo);

    /**
     * 根据条件查iot设备关联机械
     * @param machineryDeviceVo
     * @return
     */
    List<MachineryIotDeviceDto> selectMachineryAndDeviceByConditionGlobal(MachineryDeviceVo machineryDeviceVo);

    List<MachineryRecord> selectByTenantId(@Param("tenantId") String tenantId);
}
